# # 递归求阶乘
num = int (input("请输入一个数："))
def factor(n):
    if n == 1:
        return 1
    else:
        return n * factor(n - 1)
print(factor(num))